package com.exception;

public class ApiResponse {
	private Integer statusCode;
	private String message;
	private Object responseData;
	public final Integer getStatusCode() {
		return statusCode;
	}

	public final void setStatusCode(Integer statusCode) {
		this.statusCode = statusCode;
	}

	public final String getMessage() {
		return message;
	}

	public final void setMessage(String message) {
		this.message = message;
	}

	public final Object getResponseData() {
		return responseData;
	}

	public final void setResponseData(Object responseData) {
		this.responseData = responseData;
	}

	private ApiResponse(ResultStatus status) {
        this.statusCode = status.code();
        this.message = status.reason();
    }
	
	public static ApiResponse success(Object responseData) {
        ApiResponse response = new ApiResponse(ResultStatus.SUCCESS);
        response.setResponseData(responseData);
        return response;
    }

}
